package org.jypj.dev.dao;

import org.jypj.dev.model.NoticeMessage;
import org.jypj.dev.util.Page;

import java.util.List;
import java.util.Map;

public interface INoticeMessageDao {

    /**
    * 保存
    * 所有字段全都保存
    * @param noticeMessage
    * @return 保存的数量
    */
    public int saveNoticeMessage(NoticeMessage noticeMessage);

    /**
    * 根据ID删除
    * @param id 主键ID
    * @return 删除记录数
    */
    public int deleteNoticeMessageById(String id);

    /**
    * 根据对象删除
    * @param noticeMessage
    * @return 删除记录数
    */
    public int deleteNoticeMessageByObject(NoticeMessage noticeMessage);

    /**
    * 更新所有字段
    * @param noticeMessage
    * @return 保存后的对象包括ID
    */
    public int updateNoticeMessage(NoticeMessage noticeMessage);

    /**
    * 按ID查询
    * @param id 主键ID
    * @return NoticeMessage
    */
    public NoticeMessage selectNoticeMessageById(String id);

    /**
    * 分页查询 包含条件
    * @param page 分页对象
    * @param map  查询条件
    * @return  List<NoticeMessage>
    */
    public List<NoticeMessage> selectOnePageByMap(Page page, Map<String, Object> map);

    /**
    * 分页查询 包含对象条件
    * @param page 分页对象
    * @param noticeMessage 查询对象
    * @return List<NoticeMessage>
    */
    public List<NoticeMessage> selectOnePageByNoticeMessage(Page page, NoticeMessage noticeMessage);

    /**
    * 按条件查询全部的
    * @param map  查询条件
    * @return  List<NoticeMessage>
    */
    public List<NoticeMessage> selectAllByMap(Map<String, Object> map);


    /**
    * 按条件查询全部的
    * @param noticeMessage 查询对象
    * @return  List<NoticeMessage>
    */
    public List<NoticeMessage> selectAllByNoticeMessage(NoticeMessage noticeMessage);

    /**
    * 按条件查询单个对象
    * @param map  查询条件
    * @return  NoticeMessage
    */
    public NoticeMessage selectObjectByMap(Map<String, Object> map);

    /**
    * 按条件查询单个对象
    * @param noticeMessage  查询条件
    * @return  NoticeMessage
    */
    public NoticeMessage selectObjectByNoticeMessage(NoticeMessage noticeMessage);
}
